package com.huawei.hwphy2d.physical.util;

import android.content.Context;
import com.huawei.hwphy2d.physical.model.Size;

public class AxisTranslater {
    public static float transPositionToBody(float f, float f2) {
        return f / f2;
    }

    public static float transPositionToBody(float f) {
        return transPositionToBody(f, BarrierParameters.RATIO);
    }

    public static float transBodyToPosition(float f, float f2) {
        return f * f2;
    }

    public static float transBodyToPosition(float f) {
        return transBodyToPosition(f, BarrierParameters.RATIO);
    }

    public static Size getTranslateSize(Context context, float f, float f2) {
        return new Size(transPositionToBody(f), transPositionToBody(f2));
    }
}
